import java.io.*;

public class DIV {
    public static void main(String[] args) {
        FileReader freader = null;
        FileWriter fwriter = null;
        BufferedReader bf = null;
        try {
            freader = new FileReader("Q1_data.txt");
            fwriter = new FileWriter("test.txt");
            bf = new BufferedReader(freader);
            StringBuffer fal = new StringBuffer();
            String line = new String();
            bf.readLine();
            while ((line = bf.readLine()) != null) {
                fal = new StringBuffer();
                System.out.println(line);
                int i = 0;
                for (; line.charAt(i) != '\t'; i++) {
                    fal.append(line.charAt(i));
                }
                System.out.println(fal);
                fwriter.write(fal + "\n");
            }
        } catch (Exception e) {
            ;
        } finally {
            try {
                if (freader != null) {
                    freader.close();
                    fwriter.close();
                }
                bf.close();
            } catch (Exception e) {
                ;
            }
        }
    }
}
